From 90461d7def6e605e410713d954307864285e8776 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Tue, 12 Dec 2000 16:54:47 +0000 Subject: [PATCH] Fix off-by-one error in checks. (Dave Lambert) Tue Dec 12 11:52:16 2000 Owen Taylor * gtk/gtkclist.c (gtk_clist_optimal_column_width): Fix off-by-one error in checks. (Dave Lambert) --- ChangeLog | 5 +++++ ChangeLog.pre-2-0 | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-2 | 5 +++++ ChangeLog.pre-2-4 | 5 +++++ ChangeLog.pre-2-6 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ gtk/gtkclist.c | 2 +- 8 files changed, 36 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 74240c4c72..be1f2536dc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Dec 12 11:52:16 2000 Owen Taylor + + * gtk/gtkclist.c (gtk_clist_optimal_column_width): Fix + off-by-one error in checks. (Dave Lambert) + 2000-12-12 Alexander Larsson * gdk/linux-fb/gdkkeyboard-fb.c (xlate_close, raw_close): diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 74240c4c72..be1f2536dc 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,8 @@ +Tue Dec 12 11:52:16 2000 Owen Taylor + + * gtk/gtkclist.c (gtk_clist_optimal_column_width): Fix + off-by-one error in checks. (Dave Lambert) + 2000-12-12 Alexander Larsson * gdk/linux-fb/gdkkeyboard-fb.c (xlate_close, raw_close): diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 74240c4c72..be1f2536dc 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +Tue Dec 12 11:52:16 2000 Owen Taylor + + * gtk/gtkclist.c (gtk_clist_optimal_column_width): Fix + off-by-one error in checks. (Dave Lambert) + 2000-12-12 Alexander Larsson * gdk/linux-fb/gdkkeyboard-fb.c (xlate_close, raw_close): diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 74240c4c72..be1f2536dc 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,8 @@ +Tue Dec 12 11:52:16 2000 Owen Taylor + + * gtk/gtkclist.c (gtk_clist_optimal_column_width): Fix + off-by-one error in checks. (Dave Lambert) + 2000-12-12 Alexander Larsson * gdk/linux-fb/gdkkeyboard-fb.c (xlate_close, raw_close): diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 74240c4c72..be1f2536dc 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +Tue Dec 12 11:52:16 2000 Owen Taylor + + * gtk/gtkclist.c (gtk_clist_optimal_column_width): Fix + off-by-one error in checks. (Dave Lambert) + 2000-12-12 Alexander Larsson * gdk/linux-fb/gdkkeyboard-fb.c (xlate_close, raw_close): diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 74240c4c72..be1f2536dc 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +Tue Dec 12 11:52:16 2000 Owen Taylor + + * gtk/gtkclist.c (gtk_clist_optimal_column_width): Fix + off-by-one error in checks. (Dave Lambert) + 2000-12-12 Alexander Larsson * gdk/linux-fb/gdkkeyboard-fb.c (xlate_close, raw_close): diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 74240c4c72..be1f2536dc 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +Tue Dec 12 11:52:16 2000 Owen Taylor + + * gtk/gtkclist.c (gtk_clist_optimal_column_width): Fix + off-by-one error in checks. (Dave Lambert) + 2000-12-12 Alexander Larsson * gdk/linux-fb/gdkkeyboard-fb.c (xlate_close, raw_close): diff --git a/gtk/gtkclist.c b/gtk/gtkclist.c index ab5ca5edfa..f79eac7c91 100644 --- a/gtk/gtkclist.c +++ b/gtk/gtkclist.c @@ -1689,7 +1689,7 @@ gtk_clist_optimal_column_width (GtkCList *clist, g_return_val_if_fail (clist != NULL, 0); g_return_val_if_fail (GTK_CLIST (clist), 0); - if (column < 0 || column > clist->columns) + if (column < 0 || column >= clist->columns) return 0; if (GTK_CLIST_SHOW_TITLES(clist) && clist->column[column].button) -- 2.30.2